home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINWORDS
/
WINE02BX.ZIP
/
LISP
/
MODES
/
C-MODE.ELC
< prev
next >
Wrap
Text File
|
1993-03-28
|
14KB
|
141 lines
;;; compiled by @win386 on Sat Mar 13 14:30:32 1993
;;; from file c:/src/lucid-19.4/lisp/modes/c-mode.el
;;; emacs version 19.3 Lucid.
;;; bytecomp version 2.08; 27-aug-92.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs18.
(if (and (boundp 'emacs-version)
(or (and (boundp 'epoch::version) epoch::version)
(string-lessp emacs-version "19")))
(error "This file was compiled for Emacs19."))
(defvar c-mode-abbrev-table nil "\
Abbrev table in use in C-mode buffers.")
(define-abbrev-table 'c-mode-abbrev-table nil)
(defvar c-mode-map nil "\
Keymap used in C mode.")
(byte-code "¼â┴ ┬├─#ê┬┼─#ê┬╞╟#ê┬╚╔#ê┬╩╦#ê┬╠═#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┬╘╒#ê┬╓╫#ç" [c-mode-map make-sparse-keymap define-key "{" electric-c-brace "}" ";" electric-c-semi "#" electric-c-sharp-sign ":" electric-c-terminator "{" c-insert-braces "" mark-c-function "" indent-c-exp "q" c-fill-paragraph "" backward-delete-char-untabify " " c-indent-command] 4)
(autoload 'c-macro-expand "cmacexp" "\
Display the result of expanding all C macros occurring in the region.
The expansion is entirely correct because it uses the C preprocessor." t)
(defvar c-mode-syntax-table nil "\
Syntax table in use in C-mode buffers.")
(byte-code "¼╦┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╩#ê┬╠╩#ê┬═╩#ê┬╬╩#ê┬╧╩#ê┬╨╩#ê┬╤╩#ê┬╥╙#ê┴ç" [c-mode-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 47 ". 14" 42 ". 23" 43 "." 45 61 37 60 62 38 124 39 "\""] 4)
(defconst c-indent-level 2 "\
*Indentation of C statements with respect to containing block.")
(defconst c-brace-imaginary-offset 0 "\
*Imagined indentation of a C open brace that actually follows a statement.")
(defconst c-brace-offset 0 "\
*Extra indentation for braces, compared with other text in same context.")
(defconst c-argdecl-indent 5 "\
*Indentation level of declarations of C function arguments.")
(defconst c-label-offset -2 "\
*Offset of C label lines and case statements relative to usual indentation.")
(defconst c-continued-statement-offset 2 "\
*Extra indent for lines not starting new statements.")
(defconst c-continued-brace-offset 0 "\
*Extra indent for substatements that start with open-braces.
This is in addition to c-continued-statement-offset.")
(defconst c-auto-newline nil "\
*Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
If you do not want a leading newline before braces then use:
(define-key c-mode-map \"{\" 'electric-c-semi)")
(defconst c-tab-always-indent t "\
*Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.")
(fset 'c-mode #[nil "└ ê┴\n!ê├┼╔\n!ê╦╠!ê═P╦╧!ê╦╨!ê╤╦╥!ê╙╦╘!ê╒╦╓!ê╤╦╫!ê╪╦┘!ê┌╦█!ê▄╦▌!ê▐╦▀!êα╦ß!ê╤!Γπ!ç" [kill-all-local-variables use-local-map c-mode-map c-mode major-mode "C" mode-name c-mode-abbrev-table local-abbrev-table set-syntax-table c-mode-syntax-table make-local-variable paragraph-start "^$\\|" page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function c-indent-line indent-region-function c-indent-region require-final-newline comment-start "/* " comment-end " */" comment-column 32 comment-start-skip "/\\*+ *" comment-indent-hook c-comment-indent parse-sexp-ignore-comments run-hooks c-mode-hook] 2 "\
Major mode for editing C code.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments are delimited with /* ... */.
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
\\{c-mode-map}
Variables controlling indentation style:
c-tab-always-indent
Non-nil means TAB in C mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
c-auto-newline
Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
c-indent-level
Indentation of C statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
c-continued-statement-offset
Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
c-continued-brace-offset
Extra indentation given to a brace that starts a substatement.
This is in addition to c-continued-statement-offset.
c-brace-offset
Extra indentation for line if it starts with an open brace.
c-brace-imaginary-offset
An open brace following other text is treated as if it were
this far to the right of the start of its line.
c-argdecl-indent
Indentation level of declarations of C function arguments.
c-label-offset
Extra indentation for line that is a label, or case or default.
Settings for K&R and BSD indentation styles are
c-indent-level 5 8
c-continued-statement-offset 5 8
c-brace-offset -5 -8
c-argdecl-indent 0 8
c-label-offset -5 -8
Turning on C mode calls the value of the variable c-mode-hook with no args,
if that value is non-nil." nil])
(fset 'c-comment-indent #[nil "└┴!½é┬ç`è┬yê└─!½ê┼╞!êiT¬Ñ└╟!¼à└╚!½â╔¬ÿbê╩╦xê┬U½ån½â┬¬àiT]*ç" [looking-at "^/\\*" 0 opoint "[ ]*}[ ]*\\($\\|/\\*\\)" search-forward "}" "^#[ ]*endif[ ]*" "^#[ ]*else[ ]*" 7 " " nil comment-column] 2])
(fset 'c-fill-paragraph #[(&optional arg) "è└yê┴┬wê├!)ë¼å╞ ╟=½┘è└yê├╚!½è╔!ê╩i╦\"¬É½â╠yê`═╬╟!╟\"ê`{)╨P╨Pîeè╙╘┬╒#ê╠yê`)}ê╓!êè╙╘!ê└yê├╪!¡é┘ -¬ä╓!)ç" [0 " " nil looking-at comment-start-skip first-line calculate-c-indent t "[ ]*/\\*.*\\*/" re-search-forward make-string 32 1 move-to-column calculate-c-indent-within-comment paragraph-start "\\|^[ ]*/\\*[ ]*$\\|^[ ]*\\*/[ ]*$\\|^[^ /*]" paragraph-separate fill-prefix search-forward "*/" move fill-paragraph arg "[ ]*\\*/" delete-indentation] 6 "\
Like \\[fill-paragraph] but handle C comments.
If point is inside a comment, the current paragraph of the comment
is filled, preserving the comment indentation or line-starting decorations." "P"])
(fset 'electric-c-brace #[(arg) "└\n¼╢l½│è├└xên)¼ë½º┼ ê╞ êcê┼ ê½è╞ ê`╚Z┼ êè ½ä Tbê╔╩!ê) ½îè bê╦╠\n!!)¬æ═V½å╬Z╦╠\n!!)ç" [nil insertpos arg " " c-auto-newline c-indent-line newline last-command-char 2 delete-char -1 self-insert-command prefix-numeric-value 127 128] 3 "\
Insert character and correct line's indentation." "P"])
(byte-code "└┴Mê┬├Mç" [c-insert-brackets #[nil "└cêè┴c)ç" [91 93] 1 nil nil] c-insert-braces #[nil "└┴!ê┬ ê├ êè┬ ê─cê├ )ç" [electric-c-brace 1 newline c-indent-line 125] 2 nil nil]] 2)
(fset 'electric-c-sharp-sign #[(arg) "è└┴xên)½ç┴├!)ç┼╞!!ç" [" " nil c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'electric-c-semi #[(arg) "½ä┴\n!ç├─\n!!ç" [c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'electric-c-terminator #[(arg) "└`¼φl½Ωè─yê┼└wêg╞U«┤╚=½ö╔╩!¼Åè╦└wê┼└wê` W)«Ü╠ ê═` \"╧8«è╨8«ä╤8))¼ªcê╥ ê½Ä╘ ¼è╒ ê`╓Z╥ êè\n½ä\nTbê╫╪!ê)\n½îè\nbê┘┌!!)¬à┘┌!!*ç" [nil end insertpos arg 0 " " 35 last-command-char 58 looking-at "case[ '/(]" "a-zA-Z0-9_$" beginning-of-defun parse-partial-sexp pps 3 4 5 c-indent-line c-auto-newline c-inside-parens-p newline 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\
Insert character and correct line's indentation." "P"])
(fset 'c-inside-parens-p #[nil "└┴┬Åç" [nil (byte-code "èî`└ ê`}êdbê┴`┬├#«üef─U*ç" [beginning-of-defun scan-lists -1 1 40] 4) ((error))] 3])
(fset 'c-indent-command #[(&optional whole-exp) "½╡┴ ┬ëè½â╟yêè╚yê`)`W½î╔╚!ê`╩┬wê¬o)V¡å╦╠$+ç¼îè═┬xên)¼â╬ ç┴ ç" [whole-exp c-indent-line nil end beg shift-amt c-tab-always-indent 0 1 forward-sexp " \n" indent-code-rigidly "#" " " insert-tab] 5 "\
Indent current line as C code, or in some cases insert a tab character.
If c-tab-always-indent is non-nil (the default), always indent current line.
Otherwise, indent the current line only if point is at the left margin
or in the lin